diff options
Diffstat (limited to 'app/[lng]/evcp/(evcp)/report/page.tsx')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/report/page.tsx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/app/[lng]/evcp/(evcp)/report/page.tsx b/app/[lng]/evcp/(evcp)/report/page.tsx index 95566b05..f84ebe52 100644 --- a/app/[lng]/evcp/(evcp)/report/page.tsx +++ b/app/[lng]/evcp/(evcp)/report/page.tsx @@ -1,26 +1,22 @@ - // app/procurement/dashboard/page.tsx import * as React from "react"; import { Skeleton } from "@/components/ui/skeleton"; import { Shell } from "@/components/shell"; import { ErrorBoundary } from "@/components/error-boundary"; -import { getDashboardData } from "@/lib/dashboard/service"; +import { getDashboardData, refreshDashboardData } from "@/lib/dashboard/service"; import { DashboardClient } from "@/lib/dashboard/dashboard-client"; +export const dynamic = 'force-dynamic'; // ① 동적 페이지 선언 + // 대시보드 데이터 로딩 컴포넌트 async function DashboardContent() { try { const data = await getDashboardData("evcp"); - - const handleRefresh = async () => { - "use server"; - return await getDashboardData("evcp"); - }; return ( <DashboardClient initialData={data} - onRefresh={handleRefresh} + onRefresh={refreshDashboardData} /> ); } catch (error) { @@ -119,9 +115,11 @@ function DashboardError({ error, reset }: { error: Error; reset: () => void }) { export default async function DashboardPage() { return ( <Shell className="gap-6"> + <ErrorBoundary fallback={DashboardError}> <React.Suspense fallback={<DashboardSkeleton />}> <DashboardContent /> </React.Suspense> + </ErrorBoundary> </Shell> ); -} +}
\ No newline at end of file |
